<%--
  Created by IntelliJ IDEA.
  User: eddie
  Date: 2022/5/6
  Time: 14:51
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
    <img src="img/iu.jpeg" style="align: center">
    <button type="submit" id="ax">发送数据</button>
    <script src="js/axios-0.18.0.js"></script>
<%--    <script>--%>
<%--        document.getElementById("ax").onclick = function (){--%>
<%--            axios({--%>
<%--                method:"post",--%>
<%--                url:"http://localhost:81/pojo",--%>
<%--                data:{--%>
<%--                    "name":"zh",--%>
<%--                    "age":26--%>
<%--                }--%>
<%--            }).then(function (resp){--%>
<%--                alert(resp.data);})--%>
<%--        }--%>

<%--    </script>--%>
    <script>
        document.getElementById("ax").onclick = function (){
            axios({
                method:"get",
                url:"http://localhost:81/student"
            }).then(function (resp){
                alert(resp.data);})
        }
    </script>
</body>
</html>
